import request from '@/utils/request'

// 访视计划
const api = {
    list: '/boss/project/visit/list',
    add: '/boss/project/visit/add',
    update: '/boss/project/visit/update', // 更改状态
    updataEdit: '/boss/project/visit/updateDetail',
    export: '/boss/project/visit/export',
    import: '/boss/project/visit/import'
}

export function list (parameter) {
    return request({
        url: api.list,
        method: 'post',
        data: parameter
    })
}
export function add (parameter) {
    return request({
        url: api.add,
        method: 'post',
        data: parameter
    })
}
export function updataEdit (parameter) {
    return request({
        url: api.updataEdit,
        method: 'post',
        data: parameter
    })
}
export function updata (parameter) {
    return request({
        url: api.update,
        method: 'post',
        data: parameter
    })
}
export function getVisitExport (parameter) {
    return request({
        url: api.export,
        method: 'get',
        params: parameter,
        responseType: 'blob'
    })
}
export function visitImport (parameter) {
    return request({
        url: api.import,
        method: 'post',
        data: parameter,
        headers: { 'Content-Type': 'multipart/form-data' }
    })
}
